<template>
  <div style="border: 2px solid black">
    详情页内容
    <com-count></com-count>
  </div>

  <button @click="back">点击返回列表页面(或者网页返回键均可),列表页面会缓存</button>

  <RouterView />
</template>

<script setup>
import ComCount from '@/components/count.vue'
import { onMounted } from 'vue'
onMounted(() => {
  console.log('onMounted:page-detail')
})

function back() {
  history.go(-1)
}
</script>

<style scoped>
button {
  margin: 10px;
}
</style>
